﻿using UnityEngine;
using System.Collections;

public class ModuleA : MonoBehaviour {

    void Awake() {
        Debug.Log("ModuleA Awake");
        //添加消息监听
        gameObject.AddComponent<UIEventListener>();

        //添加当前物体的处理函数
        UIEventListener.Get(gameObject).onClick += BtClick;
    }
    private void BtClick(GameObject obj) {
        //模块A发送消息给模块B
        Debug.Log("ModuleA 发送消息");
        GlobalMgr.EventMgr(ModuleBArgs.LOAD);
    }
}
